.class public Lcom/waiqin365/h5/product/WqSelectProducts;
.super Lorg/apache/cordova/CordovaPlugin;

# interfaces
.implements Ljava/util/Observer;


# instance fields
.field public final a:Ljava/lang/String;

.field private b:Lorg/apache/cordova/WqCordovaActivity;

.field private c:Ljava/lang/String;

.field private d:Ljava/lang/String;

.field private e:Ljava/util/List;

.field private f:Lcom/waiqin365/lightapp/product/d/g;

.field private g:Lorg/apache/cordova/CallbackContext;


# direct methods
.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Lorg/apache/cordova/CordovaPlugin;-><init>()V

    invoke-static {}, Ljava/util/UUID;->randomUUID()Ljava/util/UUID;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/UUID;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->a:Ljava/lang/String;

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->e:Ljava/util/List;

    return-void
.end method

.method static synthetic a(Lcom/waiqin365/h5/product/WqSelectProducts;)Lorg/apache/cordova/WqCordovaActivity;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->b:Lorg/apache/cordova/WqCordovaActivity;

    return-object v0
.end method

.method static synthetic b(Lcom/waiqin365/h5/product/WqSelectProducts;)Lcom/waiqin365/lightapp/product/d/g;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->f:Lcom/waiqin365/lightapp/product/d/g;

    return-object v0
.end method


# virtual methods
.method public execute(Ljava/lang/String;Lorg/apache/cordova/CordovaArgs;Lorg/apache/cordova/CallbackContext;)Z
    .locals 6

    const/4 v5, 0x1

    const/4 v1, 0x0

    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->cordova:Lorg/apache/cordova/CordovaInterface;

    invoke-interface {v0}, Lorg/apache/cordova/CordovaInterface;->getActivity()Landroid/app/Activity;

    move-result-object v0

    check-cast v0, Lorg/apache/cordova/WqCordovaActivity;

    iput-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->b:Lorg/apache/cordova/WqCordovaActivity;

    iput-object p3, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->g:Lorg/apache/cordova/CallbackContext;

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->e:Ljava/util/List;

    new-instance v0, Lcom/waiqin365/lightapp/product/d/g;

    invoke-direct {v0}, Lcom/waiqin365/lightapp/product/d/g;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->f:Lcom/waiqin365/lightapp/product/d/g;

    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->f:Lcom/waiqin365/lightapp/product/d/g;

    sget-object v2, Lcom/waiqin365/lightapp/product/s;->n:Lcom/waiqin365/lightapp/product/s;

    iput-object v2, v0, Lcom/waiqin365/lightapp/product/d/g;->d:Lcom/waiqin365/lightapp/product/s;

    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->f:Lcom/waiqin365/lightapp/product/d/g;

    iput-boolean v1, v0, Lcom/waiqin365/lightapp/product/d/g;->j:Z

    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->f:Lcom/waiqin365/lightapp/product/d/g;

    const-string/jumbo v2, ""

    iput-object v2, v0, Lcom/waiqin365/lightapp/product/d/g;->m:Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->f:Lcom/waiqin365/lightapp/product/d/g;

    const-string/jumbo v2, ""

    iput-object v2, v0, Lcom/waiqin365/lightapp/product/d/g;->c:Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->f:Lcom/waiqin365/lightapp/product/d/g;

    iput-boolean v5, v0, Lcom/waiqin365/lightapp/product/d/g;->f:Z

    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->f:Lcom/waiqin365/lightapp/product/d/g;

    iget-object v0, v0, Lcom/waiqin365/lightapp/product/d/g;->i:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->f:Lcom/waiqin365/lightapp/product/d/g;

    iput-boolean v1, v0, Lcom/waiqin365/lightapp/product/d/g;->k:Z

    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->f:Lcom/waiqin365/lightapp/product/d/g;

    invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v2

    iput-object v2, v0, Lcom/waiqin365/lightapp/product/d/g;->e:Ljava/lang/Class;

    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->f:Lcom/waiqin365/lightapp/product/d/g;

    new-instance v2, Lcom/waiqin365/lightapp/product/d/j;

    invoke-direct {v2}, Lcom/waiqin365/lightapp/product/d/j;-><init>()V

    iput-object v2, v0, Lcom/waiqin365/lightapp/product/d/g;->h:Lcom/waiqin365/lightapp/product/d/j;

    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->f:Lcom/waiqin365/lightapp/product/d/g;

    iget-object v0, v0, Lcom/waiqin365/lightapp/product/d/g;->h:Lcom/waiqin365/lightapp/product/d/j;

    iput-boolean v1, v0, Lcom/waiqin365/lightapp/product/d/j;->m:Z

    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->f:Lcom/waiqin365/lightapp/product/d/g;

    iput-boolean v1, v0, Lcom/waiqin365/lightapp/product/d/g;->a:Z

    if-eqz p2, :cond_4

    invoke-virtual {p2, v1}, Lorg/apache/cordova/CordovaArgs;->isNull(I)Z

    move-result v0

    if-nez v0, :cond_4

    const/4 v0, 0x0

    :try_start_0
    invoke-virtual {p2, v0}, Lorg/apache/cordova/CordovaArgs;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->c:Ljava/lang/String;

    new-instance v3, Lorg/json/JSONObject;

    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->c:Ljava/lang/String;

    invoke-direct {v3, v0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string/jumbo v0, "title"

    invoke-virtual {v3, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_2

    const-string/jumbo v0, "title"

    invoke-virtual {v3, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    :goto_0
    iput-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->d:Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->d:Ljava/lang/String;

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->f:Lcom/waiqin365/lightapp/product/d/g;

    iget-object v2, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->d:Ljava/lang/String;

    iput-object v2, v0, Lcom/waiqin365/lightapp/product/d/g;->g:Ljava/lang/String;

    :cond_0
    const-string/jumbo v0, "ids"

    invoke-virtual {v3, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_3

    const-string/jumbo v0, "ids"

    invoke-virtual {v3, v0}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v0

    :goto_1
    move v2, v1

    :goto_2
    invoke-virtual {v0}, Lorg/json/JSONArray;->length()I

    move-result v1

    if-ge v2, v1, :cond_6

    invoke-virtual {v0, v2}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v1

    const-string/jumbo v4, "id"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_5

    const-string/jumbo v4, "id"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    :goto_3
    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v4

    if-nez v4, :cond_1

    new-instance v4, Lcom/waiqin365/base/db/jxccache/g;

    invoke-direct {v4}, Lcom/waiqin365/base/db/jxccache/g;-><init>()V

    invoke-virtual {v4, v1}, Lcom/waiqin365/base/db/jxccache/g;->a(Ljava/lang/String;)V

    iget-object v1, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->e:Ljava/util/List;

    invoke-interface {v1, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    :cond_1
    add-int/lit8 v1, v2, 0x1

    move v2, v1

    goto :goto_2

    :cond_2
    const-string/jumbo v0, ""

    goto :goto_0

    :cond_3
    new-instance v0, Lorg/json/JSONArray;

    invoke-direct {v0}, Lorg/json/JSONArray;-><init>()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    :cond_4
    :goto_4
    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->b:Lorg/apache/cordova/WqCordovaActivity;

    invoke-virtual {v0}, Lorg/apache/cordova/WqCordovaActivity;->getThreadPool()Ljava/util/concurrent/ExecutorService;

    move-result-object v0

    new-instance v1, Lcom/waiqin365/h5/product/a;

    invoke-direct {v1, p0}, Lcom/waiqin365/h5/product/a;-><init>(Lcom/waiqin365/h5/product/WqSelectProducts;)V

    invoke-interface {v0, v1}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V

    return v5

    :cond_5
    :try_start_1
    const-string/jumbo v1, ""

    goto :goto_3

    :cond_6
    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->f:Lcom/waiqin365/lightapp/product/d/g;

    iget-object v1, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->e:Ljava/util/List;

    iput-object v1, v0, Lcom/waiqin365/lightapp/product/d/g;->i:Ljava/util/List;

    const-string/jumbo v0, "1"

    const-string/jumbo v1, "needShowDelete"

    const-string/jumbo v2, "0"

    invoke-virtual {v3, v1, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_7

    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->f:Lcom/waiqin365/lightapp/product/d/g;

    iget-object v0, v0, Lcom/waiqin365/lightapp/product/d/g;->h:Lcom/waiqin365/lightapp/product/d/j;

    const/4 v1, 0x1

    iput-boolean v1, v0, Lcom/waiqin365/lightapp/product/d/j;->m:Z

    goto :goto_4

    :cond_7
    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->f:Lcom/waiqin365/lightapp/product/d/g;

    iget-object v0, v0, Lcom/waiqin365/lightapp/product/d/g;->h:Lcom/waiqin365/lightapp/product/d/j;

    const/4 v1, 0x0

    iput-boolean v1, v0, Lcom/waiqin365/lightapp/product/d/j;->m:Z
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_4
.end method

.method public onDestroy()V
    .locals 1

    invoke-static {}, Lcom/fiberhome/gaea/client/a/b;->a()Lcom/fiberhome/gaea/client/a/b;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/fiberhome/gaea/client/a/b;->deleteObserver(Ljava/util/Observer;)V

    invoke-super {p0}, Lorg/apache/cordova/CordovaPlugin;->onDestroy()V

    return-void
.end method

.method public update(Ljava/util/Observable;Ljava/lang/Object;)V
    .locals 8

    instance-of v0, p2, Lcom/fiberhome/gaea/client/a/c;

    if-eqz v0, :cond_28

    move-object v0, p2

    check-cast v0, Lcom/fiberhome/gaea/client/a/c;

    const-string/jumbo v1, "has_data_h5"

    iget-object v2, v0, Lcom/fiberhome/gaea/client/a/c;->a:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_28

    iget-object v1, v0, Lcom/fiberhome/gaea/client/a/c;->c:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    if-eqz v1, :cond_0

    iget-object v0, v0, Lcom/fiberhome/gaea/client/a/c;->c:Ljava/util/List;

    invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/List;->contains(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_28

    :cond_0
    invoke-static {}, Lcom/fiberhome/gaea/client/a/b;->a()Lcom/fiberhome/gaea/client/a/b;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/fiberhome/gaea/client/a/b;->deleteObserver(Ljava/util/Observer;)V

    check-cast p2, Lcom/fiberhome/gaea/client/a/c;

    iget-object v0, p2, Lcom/fiberhome/gaea/client/a/c;->b:Ljava/lang/Object;

    check-cast v0, Ljava/util/List;

    if-eqz v0, :cond_28

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    if-lez v1, :cond_28

    new-instance v3, Lorg/json/JSONArray;

    invoke-direct {v3}, Lorg/json/JSONArray;-><init>()V

    const/4 v1, 0x0

    move v2, v1

    :goto_0
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    if-ge v2, v1, :cond_27

    iget-object v1, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->b:Lorg/apache/cordova/WqCordovaActivity;

    invoke-static {v1}, Lcom/waiqin365/base/db/offlinedata/w;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/offlinedata/w;

    move-result-object v4

    invoke-interface {v0, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/waiqin365/base/db/jxccache/g;

    invoke-virtual {v1}, Lcom/waiqin365/base/db/jxccache/g;->b()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v4, v1}, Lcom/waiqin365/base/db/offlinedata/w;->b(Ljava/lang/String;)Lcom/waiqin365/lightapp/product/d/f;

    move-result-object v4

    if-eqz v4, :cond_1

    new-instance v5, Lorg/json/JSONObject;

    invoke-direct {v5}, Lorg/json/JSONObject;-><init>()V

    :try_start_0
    const-string/jumbo v6, "id"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->a()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_2

    const-string/jumbo v1, ""

    :goto_1
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "name"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->b()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_3

    const-string/jumbo v1, ""

    :goto_2
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "code"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->c()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_4

    const-string/jumbo v1, ""

    :goto_3
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "barcode"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->i()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_5

    const-string/jumbo v1, ""

    :goto_4
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "spec"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->d()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_6

    const-string/jumbo v1, ""

    :goto_5
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "nameSpec"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->e()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_7

    const-string/jumbo v1, ""

    :goto_6
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "classid"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->g()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_8

    const-string/jumbo v1, ""

    :goto_7
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "className"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->h()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_9

    const-string/jumbo v1, ""

    :goto_8
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "productPic"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->A()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_a

    const-string/jumbo v1, ""

    :goto_9
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "bigPkgUnit"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->y()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_b

    const-string/jumbo v1, ""

    :goto_a
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "unit"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->j()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_c

    const-string/jumbo v1, ""

    :goto_b
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "brand"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->k()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_d

    const-string/jumbo v1, ""

    :goto_c
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "productRemarks"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->B()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_e

    const-string/jumbo v1, ""

    :goto_d
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "status"

    iget-object v1, v4, Lcom/waiqin365/lightapp/product/d/f;->c:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_f

    const-string/jumbo v1, ""

    :goto_e
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "saleStatus"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->t()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_10

    const-string/jumbo v1, ""

    :goto_f
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "validPeriod"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->v()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_11

    const-string/jumbo v1, ""

    :goto_10
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "weight"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->w()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_12

    const-string/jumbo v1, ""

    :goto_11
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "price"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->l()Ljava/lang/Double;

    move-result-object v1

    if-nez v1, :cond_13

    const-string/jumbo v1, ""

    :goto_12
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "suggestPrice"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->o()Ljava/lang/Double;

    move-result-object v1

    if-nez v1, :cond_14

    const-string/jumbo v1, ""

    :goto_13
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "disPrice"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->m()Ljava/lang/Double;

    move-result-object v1

    if-nez v1, :cond_15

    const-string/jumbo v1, ""

    :goto_14
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "costPrice"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->n()Ljava/lang/Double;

    move-result-object v1

    if-nez v1, :cond_16

    const-string/jumbo v1, ""

    :goto_15
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "bigPkgNum"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->z()Ljava/lang/Double;

    move-result-object v1

    if-nez v1, :cond_17

    const-string/jumbo v1, ""

    :goto_16
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "tagNew"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->C()Ljava/lang/Boolean;

    move-result-object v1

    if-nez v1, :cond_18

    const-string/jumbo v1, ""

    :goto_17
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "tagHot"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->D()Ljava/lang/Boolean;

    move-result-object v1

    if-nez v1, :cond_19

    const-string/jumbo v1, ""

    :goto_18
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "tagSale"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->F()Ljava/lang/Boolean;

    move-result-object v1

    if-nez v1, :cond_1a

    const-string/jumbo v1, ""

    :goto_19
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "tagGift"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->E()Ljava/lang/Boolean;

    move-result-object v1

    if-nez v1, :cond_1b

    const-string/jumbo v1, ""

    :goto_1a
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "props"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->H()Ljava/lang/String;

    move-result-object v1

    if-nez v1, :cond_1c

    const-string/jumbo v1, ""

    :goto_1b
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "propDetail"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->I()Ljava/lang/String;

    move-result-object v1

    if-nez v1, :cond_1d

    const-string/jumbo v1, ""

    :goto_1c
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v1, "minNum"

    iget-wide v6, v4, Lcom/waiqin365/lightapp/product/d/f;->a:D

    invoke-virtual {v5, v1, v6, v7}, Lorg/json/JSONObject;->put(Ljava/lang/String;D)Lorg/json/JSONObject;

    const-string/jumbo v1, "maxNum"

    iget-wide v6, v4, Lcom/waiqin365/lightapp/product/d/f;->b:D

    invoke-virtual {v5, v1, v6, v7}, Lorg/json/JSONObject;->put(Ljava/lang/String;D)Lorg/json/JSONObject;

    const-string/jumbo v6, "storeCount"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->M()Ljava/lang/Double;

    move-result-object v1

    if-nez v1, :cond_1e

    const-string/jumbo v1, ""

    :goto_1d
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "propvalues"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->I()Ljava/lang/String;

    move-result-object v1

    if-nez v1, :cond_1f

    const-string/jumbo v1, ""

    :goto_1e
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "nameSpec"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->e()Ljava/lang/String;

    move-result-object v1

    if-nez v1, :cond_20

    const-string/jumbo v1, ""

    :goto_1f
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "productRemarks"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->B()Ljava/lang/String;

    move-result-object v1

    if-nez v1, :cond_21

    const-string/jumbo v1, ""

    :goto_20
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "props"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->H()Ljava/lang/String;

    move-result-object v1

    if-nez v1, :cond_22

    const-string/jumbo v1, ""

    :goto_21
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "propDetail"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->I()Ljava/lang/String;

    move-result-object v1

    if-nez v1, :cond_23

    const-string/jumbo v1, ""

    :goto_22
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "reportUnitName"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->J()Ljava/lang/String;

    move-result-object v1

    if-nez v1, :cond_24

    const-string/jumbo v1, ""

    :goto_23
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "reportUnitID"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->K()Ljava/lang/String;

    move-result-object v1

    if-nez v1, :cond_25

    const-string/jumbo v1, ""

    :goto_24
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v6, "reportUnitRatio"

    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->L()Ljava/lang/Double;

    move-result-object v1

    if-nez v1, :cond_26

    const-string/jumbo v1, ""

    :goto_25
    invoke-virtual {v5, v6, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    :goto_26
    invoke-virtual {v3, v5}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;

    :cond_1
    add-int/lit8 v1, v2, 0x1

    move v2, v1

    goto/16 :goto_0

    :cond_2
    :try_start_1
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->a()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_1

    :cond_3
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->b()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_2

    :cond_4
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->c()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_3

    :cond_5
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->i()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_4

    :cond_6
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->d()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_5

    :cond_7
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->e()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_6

    :cond_8
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->g()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_7

    :cond_9
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->h()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_8

    :cond_a
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->A()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_9

    :cond_b
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->y()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_a

    :cond_c
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->j()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_b

    :cond_d
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->k()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_c

    :cond_e
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->B()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_d

    :cond_f
    iget-object v1, v4, Lcom/waiqin365/lightapp/product/d/f;->c:Ljava/lang/String;

    goto/16 :goto_e

    :cond_10
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->t()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_f

    :cond_11
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->v()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_10

    :cond_12
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->w()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_11

    :cond_13
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->l()Ljava/lang/Double;

    move-result-object v1

    goto/16 :goto_12

    :cond_14
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->o()Ljava/lang/Double;

    move-result-object v1

    goto/16 :goto_13

    :cond_15
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->m()Ljava/lang/Double;

    move-result-object v1

    goto/16 :goto_14

    :cond_16
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->n()Ljava/lang/Double;

    move-result-object v1

    goto/16 :goto_15

    :cond_17
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->z()Ljava/lang/Double;

    move-result-object v1

    goto/16 :goto_16

    :cond_18
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->C()Ljava/lang/Boolean;

    move-result-object v1

    goto/16 :goto_17

    :cond_19
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->D()Ljava/lang/Boolean;

    move-result-object v1

    goto/16 :goto_18

    :cond_1a
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->F()Ljava/lang/Boolean;

    move-result-object v1

    goto/16 :goto_19

    :cond_1b
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->E()Ljava/lang/Boolean;

    move-result-object v1

    goto/16 :goto_1a

    :cond_1c
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->H()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_1b

    :cond_1d
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->I()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_1c

    :cond_1e
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->M()Ljava/lang/Double;

    move-result-object v1

    goto/16 :goto_1d

    :cond_1f
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->I()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_1e

    :cond_20
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->e()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_1f

    :cond_21
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->B()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_20

    :cond_22
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->H()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_21

    :cond_23
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->I()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_22

    :cond_24
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->J()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_23

    :cond_25
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->K()Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_24

    :cond_26
    invoke-virtual {v4}, Lcom/waiqin365/lightapp/product/d/f;->L()Ljava/lang/Double;
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    move-result-object v1

    goto/16 :goto_25

    :catch_0
    move-exception v1

    invoke-virtual {v1}, Lorg/json/JSONException;->printStackTrace()V

    goto/16 :goto_26

    :cond_27
    iget-object v0, p0, Lcom/waiqin365/h5/product/WqSelectProducts;->g:Lorg/apache/cordova/CallbackContext;

    invoke-virtual {v0, v3}, Lorg/apache/cordova/CallbackContext;->success(Lorg/json/JSONArray;)V

    :cond_28
    return-void
.end method
